
package com.jf.cloud.common.constant;

/**
 * @author zz
 */
public enum SearchPayType {

    /** 积分支付*/
    SCOREPAY(0,"积分支付"),

    /** 微信支付*/
    WECHATPAY(1,"微信支付"),

    /** 支付宝支付*/
    ALIPAY(2,"支付宝支付"),

    /** 余额支付*/
    BALANCE(3,"余额支付")
    ;



    private final Integer num;

    private final String payTypeName;

    public Integer value() {
        return num;
    }

    public String getPayTypeName() {
        return payTypeName;
    }

    SearchPayType(Integer num, String payTypeName){
        this.num = num;
        this.payTypeName = payTypeName;
    }

    public static SearchPayType instance(Integer value) {
        SearchPayType[] enums = values();
        for (SearchPayType statusEnum : enums) {
            if (statusEnum.value().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }

    public static String getPayTypeName(Integer value) {
        SearchPayType[] enums = values();
        for (SearchPayType statusEnum : enums) {
            if (statusEnum.value().equals(value)) {
                return statusEnum.payTypeName;
            }
        }
        return null;
    }
}
